@extends('common.admin-master')

@section('html-body')
    <div class="content">

        <div class="header">
            <h1 class="page-title">消息管理</h1>
        </div>

        <div class="container-fluid">
            <div class="row-fluid">

                <div class="row-fluid">
                    <div id="TabContent" class="tab-content">
                        <div class="tab-pane fade in active" id="creater_list">
                            <div class="row-fluid">
                                <div class="block span12">
                                    <a href="#tablewidget" class="block-heading" data-toggle="collapse">消息列表<span
                                                class="label label-warning"></span></a>
                                    <div id="tablewidget" class="block-body collapse in">
                                        <table class="table">
                                            <thead>
                                            <tr>
                                                <th>消息id</th>
                                                <th>发送对象</th>
                                                <th>发送内容</th>
                                                <th>发送时间</th>
                                            </tr>
                                            </thead>
                                            <tbody>
                                            @if($msgs)
                                                @foreach($msgs as $msg)
                                                    <tr>
                                                        <td>{{$msg->id}}</td>
                                                        <td>{{$msg->user->getDisplayName()}}</td>
                                                        <td>{{$msg->system_msg}}</td>
                                                        <td>{{$msg->created_at}}</td>
                                                    </tr>
                                                @endforeach
                                            @endif
                                            </tbody>
                                        </table>
                                    </div>
                                    <div class="pagination">
                                        <ul>
                                            {!! $msgs->render() !!}
                                        </ul>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>

            </div>
        </div>

    </div>
@endsection
